<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
import Edit from "../edit/index";
export default {
  mixins: [
    Vue.prototype.$vFN.Mixins.Base,
    Vue.prototype.$vFN.Mixins.Page,
    Vue.prototype.$vFN.Mixins.Table,
  ],
  components: {},
  data() {
    return {
      appWindow: window,
      moreSearchShow: false,
      // 页面接口地址
      apiUrl: {
        list: "mall-site-portal/member-level/list",
        delete: "mall-site-portal/member-level/delete",
      },

      isIndeterminate: false,
      checkAll: false,

      mixinTable_tableSearchData: {
        name: "",
      },
      // 表格数据
      // tableData: [],
      // 表格数据删除展示结构
      tableDeleteConfig: {
        title: "确认删除?",
        columns: [
          {
            label: "等级权重",
            prop: "grade",
            type: "",
          },
          {
            label: "等级名称",
            prop: "name",
            type: "",
          },
          {
            label: "会员数量",
            prop: "memberCount",
            type: "",
          },
            {
            label: "备注",
            prop: "remark",
            type: "",
          },
        ],
      },
    };
  },
  methods: {
    // 打开添加/修改
    editBoxOpen(params_) {
      Edit.init({
        type: params_.type,
        id: params_.id,
        isDefault: params_.isDefault,
        onSuccess: (res) => {
          this.mixinTable_refreshData();
        },
      });
    },
    // 初始化
    init() {
      // 刷新表格数据，此方法扩展时可重写
      this.mixinTable_refreshData();
    },
  },
  watch: {},
  mounted() {
    this.init();
  },
  activated() {},
};
</script>
